<template>
	<div class="activity" v-on:mouseover="addBorder" v-on:mouseout="removeBorder" ref="boxShadow">
		<div class="activity-content f-l" ref="changeColor">
			<span class="activity-kind">礼盒</span>
			<div class="keywords">
				<span>热门TOP</span>
				<ul>
					<li>情人节</li>
					<li>礼盒</li>
				</ul>
			</div>
		</div>
		<div class="four-goods" ref="addBorder">
			<div class="f-l">
				<goods></goods>
			</div>
			<div class="f-l">
				<goods></goods>
			</div>
			<div class="f-l">
				<goods></goods>
			</div>
			<div class="f-l">
				<goods></goods>
			</div>
		</div>

	</div>
</template>

<script>
	import goods from "./goods.vue"
	export default {
		props: ['color'],
		mounted: function() {
			//			console.log(this.color);
			this.$refs.changeColor.style.backgroundColor = this.color;
		},
		components: {
			goods,
		},
		data() {
			return {
				ShowBorderFlag: false,
			}
		},
		methods: {
			addBorder: function() {
				console.log("addddddddddddd")
				this.$refs.addBorder.style.border = "2px solid" + this.color;
				this.$refs.boxShadow.style.boxShadow = "none";

			},
			removeBorder: function() {
				//				this.$refs.addBorder.style.width = "1200px"
				this.$refs.addBorder.style.border = "none";
				this.$refs.boxShadow.style.boxShadow = "0 0 10px rgba(0, 0, 0, .5)";
			},
		}

	}
</script>

<style lang="less" rel="stylesheet/less">
	.activity {
		/*&:hover{
			width: 1300px;
			border: 3px solid yellow;
		}*/
		box-sizing: border-box;
		cursor: pointer;
		transition-property: all;
		transition-duration: 0.1s;
		transition-timing-function: ease;
		width: 1200px;
		height: 252px;
		margin: 20px auto 0 auto;
		box-shadow: 0 0 10px rgba(0, 0, 0, .5);
		/*font-size: 0;*/
		font-family: "微软雅黑";
		.activity-content {
			color: white;
			width: 144px;
			height: 252px;
			background-color: #e54d42;
			.activity-kind {
				box-sizing: border-box;
				display: inline-block;
				height: 40px;
				width: 100%;
				text-align: center;
				font-size: 1.75rem;
				padding: 5px;
			}
			.keywords {
				background-color: rgba(255, 255, 255, 0.1);
				height: 212px;
				span {
					font-size: 1.25rem;
					margin: 0 5px;
				}
				ul {
					li {
						padding: 5px 10px;
						margin: 5px 10px;
						display: inline-block;
						float: left;
						background-color: rgba(255, 255, 255, 0.1);
					}
				}
			}
		}
		.four-goods {
			float: left;
			border: 2px solid white;
			box-sizing: border-box;
			overflow: hidden;
			
		}
		.f-l {
				float: left;
			}
	}
</style>